package com.eduction.service.impl;

import java.sql.SQLException;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.eduction.bean.ItemListExpertBean;
import com.eduction.modules.system.dao.ExpertItemMapRepository;
import com.eduction.modules.system.entity.ExpertItemMap;
import com.eduction.service.ExpertItemMapService;

@Service
public class ExpertItemMapServiceImpl implements ExpertItemMapService{

	@Autowired
	private ExpertItemMapRepository expertItemMapRepository;
	
	@Override
	public void saveExpertItemMap(ExpertItemMap e) {
		expertItemMapRepository.saveExpertItemMap(e);
		
	}

	@Override
	public List<ExpertItemMap> queryInfoBySchoolId(String schoolId,String type) throws SQLException {
		List<ExpertItemMap> list = expertItemMapRepository.queryInfoBySchoolId(schoolId,type);
		return list;
	}

	@Override
	public List<ItemListExpertBean> queryListByExpertId(String expertId,String type,String identity) throws SQLException {
		List<ItemListExpertBean> list = expertItemMapRepository.queryListByExpertId(expertId,type,identity);
		return list;
	}
	@Override
	public void deleteBySchoolIdAndExpertId(String schoolId, String pId,String type) throws SQLException {
		expertItemMapRepository.deleteBySchoolIdAndExpertId(schoolId,pId,type);
	}
	@Override
	public List<ItemListExpertBean> groupBySchoolId(String expertId, String type) throws SQLException{
		return expertItemMapRepository.groupBySchoolId(expertId,type);
	}
}
